<?php defined('SEJUJOPEFDNGJSL') or exit('Access denied');?>
    <div class="panel panel-inverse">
        <div class="panel-heading">
            <div class="row">
                <div class="col-md-6">
                    <h4 class="panel-title">兑换记录</h4>
                </div>
               <!--  <div class="col-md-6 text-right">
                    <a href="<?php echo $GLOBALARR['curl']?>" style="color: red;">返回</a>
                </div> -->
            </div>
        </div>
        <div class="panel-body">
        <div class="table-responsive">
                <table class="table table-bordered table-striped givetable">
                  <tbody>
                    <tr >
                        <th>序号</th>
                        <th>兑换数量</th>
                        <th>兑换单价</th>
                        <th>兑换时间</th>
                        <th>钱包地址</th>
                        <th>兑换金额</th>
                        <th>手续费</th>
                        <th>总金额</th>
                        <th>兑换类型</th>
                        <th>状态</th>
                    </tr>
                <?php
                $pagecount=10;
                $condition=" where cuid='$_userid' and type = 0";
                $psql="select count(0) from ld_transfer_coin $condition";
                $db->query($psql,3);
                $pcount=$db->fval;
                $pagecount=$pagecount;   //每页条数
                $astr="&lsact=coinrecord&templist=1";    //Url
                $pagearr=pagelist($pagecount,$pcount,$astr);
                $offset=$pagearr[1];

                $sql="select * from ld_transfer_coin $condition order by id desc limit $offset,$pagecount";
                $db->query($sql);
                $rs=$db->rs;
                $ii=0;
                foreach ($rs as $k => $v) {
                  $ii++;
                  $serialid=($pagearr[2]-1)*$pagecount+$ii;
                  if($v['ctype']==0){
                     $type='VIC钱包';
                  }elseif ($v['ctype']==1) {
                      $type='利息钱包';
                  }elseif ($v['ctype']==2) {
                      $type='动态钱包';
                  }elseif ($v['ctype']==3) {
                      $type='晋级钱包';
                  }
                  if($v['is_cross']==0){
                     $cross='未审核';
                  }elseif ($v['is_cross']==1) {
                     $cross='审核通过';
                  }elseif ($v['is_cross']==2) {
                     $cross='审核失败';
                  }
                ?>
                    <tr>
                        <td ><?php echo $serialid?></td>
                        <td><?php echo round($v['num'],6);?></td>
                        <td><?php echo round($v['cprice'],6)?></td>
                        <td><?php echo date("Y-m-d H:i:s",$v['ctime'])?>&nbsp;</td>
                        <td><?php echo $v['caddress']?></td>
                        <td><?php echo round($v['ctotal']-$v['cfee'],6);?></td>
                        <td><?php echo round($v['cfee'],6)?></td>
                        <td><?php echo round($v['ctotal'],6)?></td>
                        <td><?php echo $type;?></td>
                        <td><?php echo $cross;?></td>
                    </tr>
                <?php
                }
                ?>
                  </tbody>
                </table>
            </div>
        </div>
    </div>
<!-- <div class="right_center">我的转账记录 <a href="<?php echo $GLOBALARR['curl']?>" style="color: red;">返回</a></div> -->

<?php if(($pcount/$pagecount)>1){?>
<div class="pagediv"><?php echo $pagearr[0]?></div>
<?php }?>
<?php if($pcount==0){?>
<div class="pagediv" style="text-align:center;color:#E47501">--> 暂无数据</div>
<?}?>
